package cu.tedu._07springaop.aop;


import org.springframework.stereotype.Component;

/*

        Component：将此类交给框架处理

 */
@Component
public class CalculatorImpl implements Calculator {


    @Override
    public int add(int m, int n) {
        int result = m + n;

        System.out.println("方法内部:" + result);
        return result;
    }

    @Override
    public int sub(int m, int n) {

        int result = m - n;

        System.out.println("方法内部:" + result);
        return result;
    }

    @Override
    public int mul(int m, int n) {

        int result = m * n;

        System.out.println("方法内部:" + result);
        return result;
    }

    @Override
    public int div(int m, int n) {

        int result = m / n;

        System.out.println("方法内部:" + result);

        return result;
    }


}